package cn.csust.net2.manager.client.panel;



import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;

public class PoorInfoPanel extends ContentPanel {
//	private BeanGridPanel<Money> moneyGridPanel;
//	private BeanGridPanel<PoorInfo> poorInfoGridPanel;
//	private TextField<String> workUnitTextField;
//	private TextField<String> workPositionTextField;
//	private DateField startDateDateField;
//	private TextField<String> gradeTextField;
//	private TextField<String> workDetailsTextField;
	
	public PoorInfoPanel () {
		setHeaderVisible(false);
		setScrollMode(Scroll.AUTO);
		setLayout(new FitLayout());
		
		create();
	}
	
	public void create() {
	//	FormData formData = new FormData("100%");  
	    FormPanel panel = new FormPanel();  
	    panel.setHeaderVisible(false); 
	    panel.setFrame(true);
	    panel.setLayout(new FitLayout());  
	  
	    LayoutContainer main = new LayoutContainer();  
	    main.setLayout(new ColumnLayout());  
	    
	    //左边贫困信息
	    final FormPanel formPanelLeft = new FormPanel();  
	    formPanelLeft.setHeaderVisible(false);
	    formPanelLeft.setLayout(new FlowLayout());
	    
	    FieldSet fieldSetLeft = new FieldSet();  
	    fieldSetLeft.setHeading("贫困信息");  
	    
//	    poorInfoGridPanel = new BeanGridPanel<PoorInfo>(new PoorInfo());
//	    poorInfoGridPanel.createDefault();
//	    poorInfoGridPanel.setHeight(350);
//	  
//	    fieldSetLeft.add(poorInfoGridPanel);
	    formPanelLeft.add(fieldSetLeft);
	    
	    
	    //缓缴学费和贷款
	    FormPanel formPanelRight = new FormPanel();  
	    formPanelRight.setHeaderVisible(false);
	    formPanelRight.setLayout(new FlowLayout());
	    
	    FieldSet fieldSetRight = new FieldSet();  
	    fieldSetRight.setHeading("缓缴学费和贷款");  
	    
//	    moneyGridPanel = new BeanGridPanel<Money>(new Money());
//	    moneyGridPanel.createDefault();
//	    moneyGridPanel.setHeight(350);
//	    
//	    fieldSetRight.add(moneyGridPanel);
	    formPanelRight.add(fieldSetRight);
	  
	    main.add(formPanelLeft, new ColumnData(.5));  
	    main.add(formPanelRight, new ColumnData(.5));  
	  
	    panel.add(main);  
	    this.add(panel);
	}
}
